package com.selfdriving.activity;

import net.tsz.afinal.annotation.view.ViewInject;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.selfdriving.R;

public class MySettingActivity extends BaseActivity implements OnClickListener
{
	@ViewInject(id = R.id.head_break, click = "topBack")
	ImageView topBack;

	private RelativeLayout MyDatasSet;
	private RelativeLayout alterPass;
	private ImageView goBreak;
	private TextView topText;

	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.my_setting);
		topText = (TextView) findViewById(R.id.top_text_middle);
		topText.setText("我的设置");
		MyDatasSet = (RelativeLayout) findViewById(R.id.mySet_data);
		alterPass = (RelativeLayout) findViewById(R.id.mySet_alterPass);
		goBreak = (ImageView) findViewById(R.id.head_break);
		alterPass.setOnClickListener(this);
		MyDatasSet.setOnClickListener(this);
		goBreak.setOnClickListener(this);
		goBreak.setVisibility(View.VISIBLE);
	}

	public void topBack(View v)
	{
		this.finish();
	}

	@Override
	public void onClick(View v)
	{
		// TODO Auto-generated method stub
		switch (v.getId())
		{
		case R.id.mySet_alterPass:
			startActivity(AlterPassword.class);
			break;

		case R.id.mySet_data:
			startActivity(AboutMeMyDatasSet.class);
			break;
		case R.id.head_break:
			finish();
			break;
		}
	}

	@Override
	public void onBackPressed()
	{
		finish();
	}
}
